import asyncio
from openai import AsyncOpenAI

# 初始化你的模型客户端
client = AsyncOpenAI(
    base_url="http://36.248.221.175:8012/v1",
    api_key="EMPTY"
)

async def main():
    # 直接调用模型
    response = await client.chat.completions.create(
        model="qwen",  # 替换为你的模型名称
        messages=[
            {"role": "system", "content": "You are responsible for responding to user requests."},
            {"role": "user", "content": "How to make scrambled eggs with tomatoes?"}
        ],
        temperature=0.5,
        max_tokens=1024
    )
    
    # 输出结果
    print(response.choices[0].message.content)

if __name__ == "__main__":
    asyncio.run(main())